#include "Mario.h"
#include "FWSprite.h"
#include "FWTexture.h"
#include "ShareComponent.h"
#include "FWContent.h"
#include "FWKeyboard.h"
Mario::Mario(void)
{	
	position.x = 0;
	position.y = 200;
}
void Mario::render()
{
	render_sprite->render(position);
}

void Mario::Load(FWContent* content)
{
	FWTexture* textureLeft;
	textureLeft= content->LoadTexture("marioleft.png");

	FWTexture* textureRight;
	textureRight = content->LoadTexture("marioright.png");
	marioLeft = new FWSprite(textureLeft,4,4);
	marioRight = new FWSprite(textureRight,5,5);
	render_sprite = marioRight;
}
Mario::~Mario(void)
{
}

void Mario::update()
{
	render_sprite->next();
}

void Mario::goLeft()
{
	position.x -=2;
	render_sprite = marioLeft;
}

void Mario::goRight()
{
	position.x +=2;
	render_sprite = marioRight;
}
